package service

import (
	"goconfcenter/dao/mysql"
	"goconfcenter/models"
	"goconfcenter/service/dto/bus"
)

type RoleService struct {
}

func RoleServiceInstance() *RoleService {
	return &RoleService{}
}
func (c *RoleService) PageByQuery(params *bus.RoleQuery) ([]*models.RolePoJo, int64) {
	return mysql.RoleDaoInstance().PageByQuery(params)
}
func (c *RoleService) Insert(role *models.Role) *models.Role {
	return mysql.RoleDaoInstance().Insert(role)
}
func (c *RoleService) Get(roleId int64) *models.Role {
	return mysql.RoleDaoInstance().Get(roleId)
}
func (c *RoleService) Update(role *models.Role) bool {
	return mysql.RoleDaoInstance().Update(role)
}
func (c *RoleService) GetList() []*models.RolePoJo {
	return mysql.RoleDaoInstance().GetList()
}
